/**
 * jQuery preload v0.1 - http://dstylewebpublisher.tistory.com
 * 
 * Open source under the BSD License.
 * Copyright © 2012 dstyle a.k.a won yong bong (webstandard@naver.com)
 * 
 * @version v0.1
 * @augments jQuery v1.7.1
 * @augments jQuery.easing
 * @Say 이미지 엘리먼트의 로딩하는 기능을 가진 메소드
 * @example http://jsfiddle.net/dstyle/C29vm/
*/
(function($){
    $.fn.preload = function(opt){
        $(this).css({opacity: 0});
        var o = {delay:500,transition:350,easing:"linear",wraperClass:"preloader"};
        $.extend(o,opt);
        $(this).wrap("<span class='"+o.wraperClass+"' />").one("load", function() {
            $(this).delay(o.delay).animate({opacity: 1}, o.transition, o.easing, function(){
                $(this).unwrap("<span class='"+o.wraperClass+"' />");
            });
        }).each(function() { if(this.complete){ $(this).trigger("load"); }; });
    };
})(jQuery);